package org.exez.modules.system.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.exez.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @Author scott
 * @since 2018-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysLoginUserVO implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * id
     */
    @Excel(name = "id", width = 15)
    @ApiModelProperty(value = "id")
    private String id;

    /**
     * 登录账号
     */
    @Excel(name = "登录账号", width = 15)
    @ApiModelProperty(value = "登录账号",required = true)
    @NotBlank(message = "登录账号不能为空")
    private String username;

    /**
     * 真实姓名
     */
    @Excel(name = "真实姓名", width = 15)
    @ApiModelProperty(value = "真实姓名",required = true)
    @NotBlank(message = "真实姓名不能为空")
    private String realname;

    /**
     * 密码
     */
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "密码",required = true)
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 编号
     */
    @ApiModelProperty(value = "编号",required = true)
    @NotBlank(message = "编号不能为空")
    private String workNo;

    /**
     * 事业单位id
     */
    @ApiModelProperty(value = "事业单位id",required = true)
    @NotNull(message = "事业单位不能为空")
    private String institutionId;


    /**
     * 功能权限
     */
    @ApiModelProperty(value = "1:admin 2：二级用户 3：三级用户",required = true)
    @NotBlank(message = "1:admin 2：二级用户 3：三级用户")
    private String authority;

    /**
     * 事业单位名称
     */
    @ApiModelProperty(value = "事业单位名称")
    private String institutionName;

    /**
     * 是否为初始密码
     */
    @ApiModelProperty(value = "是否为初始密码")
    private Boolean isInitialPassword;

    /**
     * token
     */
    @ApiModelProperty(value = "token")
    private String token;

    /**
     * 是否为多个单位
     */
    @ApiModelProperty(value = "是否为多个单位")
    private Boolean isInstitutionPlural;

    /**
     * 首页单位名称
     */
    @ApiModelProperty(value = "首页单位名称")
    private String indexName;
}
